package com.itheima._1_link;

import java.util.LinkedList;

public class myLinkedList {
    public static void main(String[] args) {
        LinkedList<Integer> list = new LinkedList<>();
        for (int i = 1; i <= 108; i++) {
            list.add(i);
        }
        while (list.size()>1){
            list.removeFirst();
            list.add(list.removeFirst());
        }
        System.out.println(list.get(0));
    }
}
